<template>
	<div class="goodsList">
		<CommonHead :title = "title" :show = "show"></CommonHead>
		<CarGoods></CarGoods>
	</div>
</template>

<script>
	import CommonHead from "./CommonHead.vue"
	import CarGoods from "./CarGoods.vue"
	
	export default{
		data(){
			return{
				title:"",
				show:""
			}
		},
		mounted(){
			this.fetchData();
		},
		methods:{
			fetchData(){
				var _this = this;
				this.$http.get("src/json/data.json").then(function(res){
					_this.title = res.data.commonHead[3].name;
					_this.show = res.data.commonHead[3].show;
				})
			}
		},
		components:{
			CommonHead,
			CarGoods
		}
	}
</script>

<style>
</style>